package com.atos.smp.actions;

import net.codeissue.web.common.ServiceFinder;

import com.atos.smp.business.CollaboratorManager;
import com.atos.smp.business.ProcessManager;
import com.atos.smp.business.ProjectManager;
import com.atos.smp.business.ToolManager;
import com.atos.smp.business.impl.CollaboratorManagerImpl;
import com.atos.smp.business.impl.ProcessManagerImpl;
import com.atos.smp.business.impl.ProjectManagerImpl;
import com.atos.smp.business.impl.ToolManagerImpl;
import com.atos.smp.dao.CollaboratorDao;
import com.atos.smp.dao.ProcessDao;
import com.atos.smp.dao.ProjectDao;
import com.atos.smp.dao.ToolDao;

public class Action {

	private static CollaboratorManager collaboratorManager;
	private static ProjectManager projectManager;
	private static ToolManager toolManager;
	private static ProcessManager processManager;
	
	static {
		CollaboratorDao cDao = (CollaboratorDao) ServiceFinder
				.findBean("collaboratorDao");
		collaboratorManager = new CollaboratorManagerImpl(cDao);
		
		ProjectDao pDao =(ProjectDao) ServiceFinder
				.findBean("projectDao");
		projectManager = new ProjectManagerImpl(pDao);
		
		ToolDao tDao = (ToolDao) ServiceFinder
				.findBean("toolDao");
		toolManager = new ToolManagerImpl(tDao);
		
		ProcessDao psDao = (ProcessDao) ServiceFinder
				.findBean("processDao");
		processManager = new ProcessManagerImpl(psDao);
		
	}

	public static CollaboratorManager getCollaboratorManager() {
		return collaboratorManager;
	}

	public static ProjectManager getProjectManager() {
		return projectManager;
	}

	public static ToolManager getToolManager() {
		return toolManager;
	}

	public static ProcessManager getProcessManager() {
		return processManager;
	}

	
}
